import QtQuick 2.0

// 继承自CustomCollapsePannel.qml，基本的折叠信息展示



CustomCollapsePannel{
    id: pannel

    property string title: "标题"
    property string contentText: "Consistent with real life: in line with the process and logic of real life, and comply with languages and habits that the users are used to;\nConsistent within interface: all elements should be consistent, such as: design style, icons and texts, position of elements, etc"


    header: Rectangle{
        height: 40*dp;  width: 500*dp
        color: "pink"
        Row{
            height: 40*dp; x: 20*dp
            Text{
                anchors.verticalCenter: parent.verticalCenter
                text: "title"
                font.pixelSize: config.fontsize
            }
        }


        Rectangle{      // 上间隔线
            height: 1; width: 500*dp
            color: "#DDDDDD"
        }
        Rectangle{      // 下间隔线
            height: 1; width: 500*dp
            y: parent.height - 1
            color: "#DDDDDD"
        }

        MouseArea{
            height: 40*dp;  width: 500*dp
            onClicked: {
                pannel.turnCollapsedState()
            }
        }
    }

    content: Rectangle{

        color: "green"

//        height: text_content.contentHeight + 40*dp; width: 500*dp
        height: 200*dp; width: 500*dp
        Text{
            id: text_content
            x: 20*dp; y: 10*dp
            width: 400*dp
            text: contentText
            wrapMode: Text.WordWrap
            font.pixelSize: config.fontsize
        }
    }




}
